<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Layout extends CI_Controller {

	function __construct()
	{
		parent::__construct();

		$this->load->helper('url');

		$this->_init();
	}

	private function _init()
	{
		$this->load->css('assets/css/progressbar/blue/pace-theme-loading-bar.css');	
		$this->load->js('assets/js/progressbar.js');
	}

	public function index()
	{
	}

	public function manage()
	{
		$this->load->css('assets/css/bootstrap.css');
		$this->load->css('assets/css/font-awesome.css');
		$this->load->css('assets/css/custom/menu.css');	
		$this->load->css('assets/css/alertify.css');
		$this->load->css('assets/css/default.css');
		$this->load->css('assets/css/clock.css');
		$this->load->js('assets/js/jquery-2.1.1.js');
		$this->load->js('assets/js/bootstrap.js');
		$this->load->js('assets/js/custom/main.js');
		$this->load->js('assets/js/custom/menu.js');		
		$this->load->js('assets/js/alertify.js');	
		$this->load->js('assets/js/clock.js');	
		$this->load->js('assets/js/moment.js');
		$this->output->set_template('manage');
		$this->load->view('layout/manage');
		$this->load->section('footer', 'layout/sections/footer');

	}

	public function manage_user_group()
	{
		$this->load->css('assets/css/tree/default/style.css');
		$this->load->css('assets/css/custom/mytree.css');
		$this->load->js('assets/js/jstree.js');
		$this->load->js('assets/js/custom/mytree_group_user.js');
		$this->output->set_template('group_user');
		$html = $this->load->section('sidebar_group_user', 'layout/sections/sidebar_group_user');
		$html .= $this->load->view('layout/manage_user_group','',true);
		echo ($html);

	}

	public function manage_domain_device()
	{
		$this->load->css('assets/css/tree/default/style.css');
		$this->load->css('assets/css/custom/mytree.css');
		$this->load->js('assets/js/jstree.js');
		$this->load->js('assets/js/custom/mytree_domain_device.js');
		$this->output->set_template('domain_device');
		$html = $this->load->section('sidebar_domain_device', 'layout/sections/sidebar_domain_device');
		$html .= $this->load->view('layout/manage_domain_device','',true);
		echo ($html);

	}

	public function manage_position_department()
	{
		$this->load->css('assets/css/themes/redmond/jquery-ui.css');
		$this->load->css('assets/css/ui.jqgrid.css');
		$this->load->css('assets/css/ui.multiselect.css');
		$this->load->js('assets/js/jquery-ui-1.9.2.js');
		$this->load->js('assets/js/i18n/grid.locale-vi.js');
		$this->output->set_template('position_department');
		$html = $this->load->view('layout/manage_position_department','',true);
		echo ($html);
	}

	public function manage_authorization()
	{
		$this->output->unset_template();
		$html = $this->load->view('layout/manage_authorization','',true);
		echo ($html);
	}
}
